package tech.aistar.mapper;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tech.aistar.entity.Programming;

import java.util.List;
@Repository
public interface ProgrammingMapper {

    @Select("select  *   from   programming")
    List<Programming>  findAll();

    @Select("select  man_language  from  programming")
    String  findprolan();

    @Select("select man_diff  from  programming")
    String  findprodiff();

    @Select("select * from programming where pro_id = #{value}")
    Programming findById(Long id);

    @Select("select  pro_id, pro_stem, pro_input, pro_answer from programming p  join questionpaper q on p.pro_id = q.que_id where q.paper_id = #{value}  and que_type =4")
    List<Programming> findByPaperId(Long paperId);






}
